<script setup lang="ts">
import { useDetails } from "../useDetails";

const props = defineProps<{projectDetails: object }>()
const {  showPopup, show } = useDetails(props)

</script>
<template>
    <div ref="details">
        <vant-from >
            <van-cell-group>
                <van-field colon v-model="projectDetails.guaranteeId" label="保单号" />
                <van-field colon v-model="projectDetails.itemName" label="项目名称" />
                <van-field colon v-model="projectDetails.insuranceCompany" label="保险公司" />
                <van-field colon v-model="projectDetails.itemSite" right-icon="location-o" label="项目地址" />
                <van-field colon v-model="projectDetails.engineeringStartStop" label="工程起止期" />
                <van-field colon v-model="projectDetails.insuranceStartStop" label="保险起止期" />
                <van-field colon v-model="projectDetails.insureCost" label="投保造价" />
                <van-row>
                    <van-col span="12">
                        <van-field colon v-model="projectDetails.premium" label="保费" />
                    </van-col>
                    <van-col span="12">
                        <van-field colon v-model="projectDetails.premiumRate" label="费率" />
                    </van-col>
                </van-row>
                <van-cell is-link @click="showPopup">保险方案</van-cell>
                <van-popup
                    v-model:show="show"
                    position="bottom"
                    closeable
                    close-icon="close"
                    :style="{ height: '50%' }"
                >{{ projectDetails.insuranceScheme }}</van-popup>
                <!-- <van-field colon v-model="detail.insuranceScheme" label="保险方案" /> -->
                <van-field colon v-model="projectDetails.insurePeople" label="投保人" />
                <van-field colon label-width="88px" v-model="projectDetails.service" label="安全服务机构" />
                <van-field colon v-model="projectDetails.guaranteeFile" label="保单文件" />
            </van-cell-group>
        </vant-from>
    </div>
</template>